xen/arm: p2m: Store in p2m_domain whether we need to clean the entry
authorJulien Grall <julien.grall@arm.com>
Thu, 15 Sep 2016 11:28:18 +0000 (12:28 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 28 Sep 2016 01:13:39 +0000 (18:13 -0700)
commit7246b86ed47898a78a8b6d33b4ff61a8cd09b1ea
tree9f5bf76f1b9455cde303bc6a5aa594edefdd11c8
parent36770c9d2b6e846a8740f351b15890f7cb396191
xen/arm: p2m: Store in p2m_domain whether we need to clean the entry

Each entry in the page table has to be cleaned when the IOMMU does not
support coherent walk. Rather than querying every time the page table is
updated, it is possible to do it only once when the p2m is initialized.

This is because this value can never change, Xen would be in big trouble
otherwise.

With this change, the initialization of the IOMMU for a given domain has
to be done earlier in order to know whether the page table entries need
to be cleaned. It is fine to move the call earlier because it has no
dependency.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
xen/arch/arm/domain.c
xen/arch/arm/p2m.c
xen/include/asm-arm/p2m.h